cmake_minimum_required(VERSION 3.7)
project(daqsys)

set(CMAKE_CXX_STANDARD 11)
if(buildsw)
    message("---------------cross tool---------------------")
    set(CMAKE_FIND_ROOT_PATH ${USR_FIND_ROOT} )
    set(CMAKE_CXX_COMPILER ${USR_CXX_COMPILER} )
endif()

set(SRC_DIR_USER ./)
set(INC_DIR_USER ../../inc/sys/)

set(SOURCE_FILES
        ${SRC_DIR_USER}bDaqMod.cpp
        ${SRC_DIR_USER}BaseDaq.cpp)

include_directories(
        ../../lib/inc/
        ../../inc/)

if (buildsw)
    set(LIBRARY_OUTPUT_PATH   ../../../bin/mipi)
    link_directories(
            ../../lib/bin/mipi
            ../../bin/mipi)
else(NOT buildsw)
    set(LIBRARY_OUTPUT_PATH   ../../../bin/gcc)
    link_directories(
            ../../lib/bin/gcc
            ../../bin/gcc)
endif ()


add_library(daqsys SHARED ${SOURCE_FILES})
target_link_libraries(daqsys bsys)
